package cn.com.homeyoda.aimate.aihealth.ui.home;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import cn.com.homeyoda.aimate.aihealth.R;
import cn.com.homeyoda.aimate.aihealth.bean.KePuBean;
import cn.com.homeyoda.aimate.aihealth.bean.ReMenBean;

import java.util.List;

/**
 * Created By 刘纯贵
 * Created Time 2020/4/30
 */
public class KePuAdapter extends BaseQuickAdapter<KePuBean, BaseViewHolder> {
    public KePuAdapter(int layoutResId, @Nullable List<KePuBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, KePuBean item) {

        helper.setText(R.id.kepu_content,item.getContent());
        helper.setText(R.id.time,"时间: "+item.getTime());
        helper.setText(R.id.name,"发布人: "+item.getName());
        helper.setText(R.id.num,"阅读: "+item.getNum());
        helper.setImageBitmap(R.id.kepu_img,item.getImgPath());

    }

    @Override
    public void setNewData(@Nullable List<KePuBean> data) {
        super.setNewData(data);
    }
}
